package cn.gjxblog.aop.proxy.cglib;


import org.springframework.aop.framework.ProxyFactory;

/**
 * 查询Spring Cglib原理
 */
public class TestProxyFactory {
    public static void main(String[] args) {
        System.setProperty("cglib.debugLocation",System.getProperty("user.dir"));
        ProxyFactory proxyFactory = new ProxyFactory();
        proxyFactory.setTarget(new UserServiceImpl());

        UserServiceImpl proxy = (UserServiceImpl) proxyFactory.getProxy();
        System.out.println(proxy.getClass());
    }


}
